package com.gugee.tiktok.web.dto.web;

import com.gugee.tiktok.web.model.mysql.RankingFollowers;
import com.xiguaji.boot.data.rdb.aggregate.Aggregate;
import com.xiguaji.boot.toolkit.DateTimeUtils;
import com.xiguaji.boot.toolkit.MapperUtils;
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Data
public class RankingFollowersResponse extends Aggregate {
    private long bloggerType;
    private int ranking;
    private int rankingType;
    private long bloggerId;
    private long uid;
    private String nickname;
    private String uniqueId;
    private String avatar;
    private String state;
    private int position;
    private String follower;
    private String followerGrowth;
    private int belong;


    @Mapper(componentModel = "spring", imports = {DateTimeUtils.class, MapperUtils.class})
    public interface RankingFollowersResponseMapper {

        @Mapping(source = "follower", target = "follower")
        @Mapping(source = "followerGrowth", target = "followerGrowth")
        RankingFollowersResponse mapper(RankingFollowers ranking);

        List<RankingFollowersResponse> mapper(List<RankingFollowers> ranking);


    }
}
